package com.tedu.api;

import org.junit.Test;

import java.util.Locale;

public class 作业 {
    @Test
    public void test1(){
        String str="HelloJava";
        System.out.println(str);
    }

    @Test
    public void test45(){
        String url="HelloJava";
       // url=url.substring(0,5);
       // System.out.println("截取Hello："+url);
        url= url.substring(5);
        System.out.println("截取"+url);
    }

    @Test
    public void test23(){
        String a="HelloJava";
        int index=a.indexOf("o");
        System.out.println("打印o"+index);

        index=a.indexOf("o",5);
        System.out.println(index);
    }

    @Test
    public void test6(){
        String str=" HelloJva ";
        str=str.trim();
        System.out.println("去掉空格："+str);
    }

    @Test
    public void test7(){
        String str="HelloJava";
        char c=str.charAt(5);
        System.out.println("获取对应字符："+c);
    }
    @Test
    public void test8(){
        String a="HelloJava";
        a=a.toLowerCase().toUpperCase();
        System.out.println(a);
    }

}
